﻿<%@ Page Title="" Language="C#" MasterPageFile="~/RentAWorkerMaster.master" AutoEventWireup="true"
    CodeBehind="SearchResource.aspx.cs" Inherits="RentAWorker.WebNew.Customer.SearchResource" %>

<%@ Register Assembly="System.Web.DynamicData, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.DynamicData" TagPrefix="cc1" %>
<%@ Register Assembly="System.Web.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
    Namespace="System.Web.UI.WebControls" TagPrefix="asp" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc2" %>
<%@ Register Src="WorkerSearchResults.ascx" TagName="WorkerSearchResults" TagPrefix="uc1" %>
<%@ Register Src="MachineSearchResults.ascx" TagName="MachineSearchResults" TagPrefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="LeftPlaceholder" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="RightPlaceholder" runat="server">
    <asp:ScriptManager ID="MainScriptManager" runat="server">
        <Services>
            <asp:ServiceReference Path="~/Services/AutoCompletionService.svc" />
        </Services>
    </asp:ScriptManager>
    <asp:ObjectDataSource ID="LocationsDataSource" runat="server" SelectMethod="GetLocations"
        TypeName="RentAWorker.WebNew.CustomerCode.RefDataHelper"></asp:ObjectDataSource>
    <asp:ObjectDataSource ID="MachineTypesDataSource" runat="server" 
        SelectMethod="GetMachineTypes" 
        TypeName="RentAWorker.WebNew.CustomerCode.RefDataHelper">
    </asp:ObjectDataSource>
    <div>
        <asp:Label ID="Label1" runat="server" Text="Name:" CssClass="labelStyleClass"></asp:Label>
        <asp:TextBox ID="SearchNameText" runat="server" CssClass="inputStyleClass"></asp:TextBox>
        <asp:Label ID="Label2" runat="server" Text="Location:" CssClass="labelStyleClass"></asp:Label>
        <asp:DropDownList ID="SearchLocationText" runat="server" CssClass="inputStyleClass"
            DataSourceID="LocationsDataSource" DataTextField="LocationName" DataValueField="LocationID">
        </asp:DropDownList>
        <asp:Label ID="Label3" runat="server" Text="From:" CssClass="labelStyleClass"></asp:Label>
        <asp:TextBox ID="SearchFromDate" runat="server" CssClass="inputStyleClass"></asp:TextBox>
        <cc2:CalendarExtender ID="SearchFromDate_CalendarExtender" runat="server" 
            Enabled="True" TargetControlID="SearchFromDate">
        </cc2:CalendarExtender>
        <asp:Label ID="Label4" runat="server" Text="To:" CssClass="labelStyleClass"></asp:Label>
        <asp:TextBox ID="SearchToDate" runat="server" CssClass="inputStyleClass"></asp:TextBox>
        <cc2:CalendarExtender ID="SearchToDate_CalendarExtender" runat="server" 
            Enabled="True" TargetControlID="SearchToDate">
        </cc2:CalendarExtender>
        <asp:Label ID="MachineStatusLabel" runat="server" CssClass="labelStyleClass" 
            Text="Machine Status:"></asp:Label>
        <asp:TextBox ID="MachineStatusText" runat="server" CssClass="inputStyleClass"></asp:TextBox>
        <cc2:AutoCompleteExtender ID="MachineStatusText_AutoCompleteExtender" 
            runat="server" Enabled="True" 
            TargetControlID="MachineStatusText"
            MinimumPrefixLength="2"
            ServicePath="~/Services/AutoCompletionService.svc"
            ServiceMethod="GetMachineStatusCompletionList">
        </cc2:AutoCompleteExtender>
        <asp:Label ID="MachineTypeLabel" runat="server" CssClass="labelStyleClass" 
            Text="Machine Type:"></asp:Label>
        <asp:DropDownList ID="MachineTypeCombo" runat="server" 
            CssClass="inputStyleClass" DataSourceID="MachineTypesDataSource" 
            DataTextField="MachineTypeName" DataValueField="MachineTypeID">
        </asp:DropDownList>
        <asp:Button ID="SearchResourceCommand" runat="server" Text="Search..."
            CssClass="submitButtonStyleClass" OnClick="SearchForWorkerCommand_Click" />
    </div>
    <cc2:TabContainer ID="ResultsTabContainer" runat="server" ActiveTabIndex="0" 
        Width="100%">
        <cc2:TabPanel runat="server" HeaderText="Workers" ID="WorkerTabPanel">
            <ContentTemplate>
                <uc1:WorkerSearchResults ID="WorkerSearchResultsView" runat="server" />
            </ContentTemplate>
        </cc2:TabPanel>
        <cc2:TabPanel runat="server" HeaderText="Machines" ID="MachineTabPanel">
            <ContentTemplate>
                <uc2:MachineSearchResults ID="MachineSearchResultsView" runat="server" />
            </ContentTemplate>
        </cc2:TabPanel>
    </cc2:TabContainer>
</asp:Content>
